		<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <ext:ResourceManager ID="ResourceManagerProxy1" runat="server">
    </ext:ResourceManager>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ext:Viewport ID="ViewPort1" runat="server" Layout="fit">
        <Items>
            <ext:FormPanel ID="pnlAddOrdershippinghistory" runat="server" Title="新增ordershippinghistory信息" Frame="True"  Layout="VBoxLayout" AutoScroll="True">
                <LayoutConfig>
                    <ext:VBoxLayoutConfig Align="Stretch" />
                </LayoutConfig>
                <Items>
										                       <ext:Container runat="server" Layout="HBoxLayout" Height="28">
                        <LayoutConfig>
                            <ext:HBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
						<ext:TextField id="txtId" runat="server" FieldLabel="Id" AllowBlank="False" BlankText="请输入Id！"   Padding="2" Flex="1"  /> 
                        </Items>
                    </ext:Container>
                       <ext:Container runat="server" Layout="HBoxLayout" Height="28">
                        <LayoutConfig>
                            <ext:HBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
						<ext:TextField id="txtOrderId" runat="server" FieldLabel="OrderId"  Padding="2" Flex="1"  /> 
                        </Items>
                    </ext:Container>
                       <ext:Container runat="server" Layout="HBoxLayout" Height="28">
                        <LayoutConfig>
                            <ext:HBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
						<ext:TextField id="txtMessage" runat="server" FieldLabel="Message"  Padding="2" Flex="1"  /> 
                        </Items>
                    </ext:Container>
                       <ext:Container runat="server" Layout="HBoxLayout" Height="28">
                        <LayoutConfig>
                            <ext:HBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
						<ext:TextField id="txtCreateDate" runat="server" FieldLabel="CreateDate"  Padding="2" Flex="1"  /> 
                        </Items>
                    </ext:Container>

                </Items>
                <Buttons>
                    <ext:Button runat="server" Text="保存"  Icon="Accept">
                        <DirectEvents>
                            <Click Before="if(!#{pnlAddOrdershippinghistory}.getForm().isValid()) return false;" OnEvent="btnAddOrdershippinghistory_Click"
                                Success="#{pnlAddOrdershippinghistory}.getForm().reset();parent.ShowMessage('操作成功','添加ordershippinghistory成功！',1);parent.RefreshOrdershippinghistoryData();parent.CloseAddOrdershippinghistory(); "
                                 Failure="Ext.Msg.alert('操作失败', result.errorMessage);">
                                <EventMask ShowMask="true" Msg="数据保存中,请稍等....." />
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button runat="server" Text="取消" Icon="Decline">
                        <Listeners>
                            <Click Handler="parent.CloseAddOrdershippinghistory();"></Click>
                        </Listeners>
                    </ext:Button>
                </Buttons>
            </ext:FormPanel>
        </Items>
    </ext:Viewport>
</asp:Content>

	    protected void Page_Load(object sender, EventArgs e)
        {
            if (X.IsAjaxRequest)
                return;
 
        }

        protected void btnEditOrdershippinghistory_Click(object sender, DirectEventArgs e)
        {
            try
            {
                Ordershippinghistory newOrdershippinghistory = new Ordershippinghistory();

                
										   newOrdershippinghistory.Id = this.txtId.Text.Trim();
   newOrdershippinghistory.OrderId = this.txtOrderId.Text.Trim();
   newOrdershippinghistory.Message = this.txtMessage.Text.Trim();
   newOrdershippinghistory.CreateDate = this.txtCreateDate.Text.Trim();



                Global.CurrentServiceContainer.OrdershippinghistoryServiceProxy.Insert(newOrdershippinghistory);
 
                ResourceManager.AjaxSuccess = true;
 
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess = false;
                ResourceManager.AjaxErrorMessage = "Error Message:" + ex.Message;
            }

        } 
			
